package org.ricks.net.transport;

import org.ricks.net.Kcp;
import org.ricks.net.KcpSeesion;
import org.ricks.net.buffer.BufferPage;
import org.ricks.net.buffer.WriteBuffer;
import org.ricks.net.handler.IoServerConfig;

import java.net.SocketAddress;
import java.nio.channels.DatagramChannel;

/**
 * @author chenwei
 * @Description:
 * @date 2023/1/517:16
 */
public class KcpChannel extends UdpChannel{

    public KcpChannel(DatagramChannel channel, UdpBootstrap.Worker worker, IoServerConfig config, BufferPage bufferPage) {
        super(channel, worker, config, bufferPage);
    }

    public KcpSeesion createSession(final SocketAddress remote, WriteBuffer writeBuffer) {
       return new KcpSeesion(this, remote, writeBuffer);
    }
}
